import 'package:dailoz/generated/json/base/json_convert_content.dart';
import 'package:dailoz/entity/user_entity.dart';

UserEntity $UserEntityFromJson(Map<String, dynamic> json) {
  final UserEntity userEntity = UserEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    userEntity.id = id;
  }
  final String? userName = jsonConvert.convert<String>(json['userName']);
  if (userName != null) {
    userEntity.userName = userName;
  }
  final String? password = jsonConvert.convert<String>(json['password']);
  if (password != null) {
    userEntity.password = password;
  }
  final String? token = jsonConvert.convert<String>(json['token']);
  if (token != null) {
    userEntity.token = token;
  }
  final int? phoneNum = jsonConvert.convert<int>(json['phoneNum']);
  if (phoneNum != null) {
    userEntity.phoneNum = phoneNum;
  }
  return userEntity;
}

Map<String, dynamic> $UserEntityToJson(UserEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['userName'] = entity.userName;
  data['password'] = entity.password;
  data['token'] = entity.token;
  data['phoneNum'] = entity.phoneNum;
  return data;
}
